#pragma once
#include "RoomBase.h"
#include <unordered_map>
#include <memory>
#include <vector>

// Forward declaration of RoomBase

using std::unordered_map;
using std::unique_ptr;
using std::vector;

class RoomBase;
class RoomManager {
private:
    
    RoomManager() = default; //constructor is private to prevent instantiation
    static RoomManager* instance; // pointer to the singleton instance

    unordered_map<int, unique_ptr<RoomBase>> rooms; // map of room ID to room object

public:

    static RoomManager* getInstance();

    bool addRoom(int roomId, std::unique_ptr<RoomBase> room);

    bool removeRoom(int roomId);

    RoomBase* getRoom(int roomId) const;

    std::vector<int> getAllRoomIds() const;

    size_t size() const;

};
